import Vue from 'vue'
import Router from 'vue-router'
const _import = require('./_import_' + process.env.NODE_ENV)

import Hello from '@/components/Hello'
import auth from '@/auth/index'
import HelloVux from '@/components/HelloFromVux'

const test = _import('test/maptest')
const home = _import('home/index')
const login = _import('login/login')
const workorder = _import('workorder/index')
const wolist = _import('workorder/List')
const workorderdetail = _import('workorder/detail')

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/hello',
      name: 'Hello',
      component: Hello
    }, {
      path: '/',
      name: 'home',
      component: home
    }, {
      path: '/h1',
      name: 'HelloVux',
      component: HelloVux
    }, {
      path: '/workorder',
      name: 'workorder',
      component: workorder
    }, {
      path: '/wodetail',
      name: 'workorderdetail',
      component: workorderdetail
    }, {
      path: '/wolist',
      name: 'wolist',
      component: wolist
    }, {
      path: '/test',
      name: 'test',
      component: test
    }, {
      path: '/login',
      name: 'login',
      component: login
    }, {
      path: '/auth',
      name: 'auth',
      component: auth
    }
  ]
}
)

